<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>门店收入报表</title>
    <#include "/common/link.ftl" >
    <script src="/js/plugins/echarts/echarts.common.min.js"></script>
</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl" >

    <#assign currentMenu="businessReport"/>

    <#include "/common/menu.ftl" >
    <div class="content-wrapper">
        <section class="content-header">
            <h1>门店收入报表</h1>
        </section>
        <section class="content">
            <div class="box">
                <div id="main" style="width: 1200px;height:600px;"></div>
                <script type="text/javascript">
                    var myChart = echarts.init(document.getElementById('main'));
                    option = {
                        tooltip: {
                            trigger: 'axis',
                            axisPointer: {
                                type: 'cross',
                                crossStyle: {
                                    color: '#999'
                                }
                            }
                        },
                        toolbox: {
                            feature: {
                                dataView: {show: true, readOnly: false},
                                magicType: {show: true, type: ['line', 'bar']},
                                restore: {show: true},
                                saveAsImage: {show: true}
                            }
                        },
                        legend: {
                            data: ['总消费金额', '总优惠金额', '总实收金额', '订单数']
                        },
                        xAxis: [
                            {
                                type: 'category',
                                data: ${groupTypeList},
                                axisPointer: {
                                    type: 'shadow'
                                }
                            }
                        ],
                        yAxis: [
                            {
                                type: 'value',
                                name: '金额',
                                min: 0,
                                axisLabel: {
                                    formatter: '{value} 元'
                                }
                            },
                            {
                                type: 'value',
                                name: '数量',
                                min: 0,
                                axisLabel: {
                                    formatter: '{value} 个'
                                }
                            }
                        ],
                        series: [
                            {
                                name: '总消费金额',
                                type: 'bar',
                                data: ${totalAmountList}
                            },
                            {
                                name: '总优惠金额',
                                type: 'bar',
                                data: ${discountAmountList}
                            },
                            {
                                name: '总实收金额',
                                type: 'bar',
                                data: ${payAmountList}
                            },
                            {
                                name: '订单数',
                                type: 'line',
                                yAxisIndex: 1,
                                data: ${numberList}
                            }
                        ]
                    };
                    myChart.setOption(option);
                </script>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
</body>
</html>